package com.zr.serviceimpl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zr.dao.DistributionRangePriceDaoLPN;
import com.zr.dao.DistributionpriceDaoLPN;
import com.zr.service.DistributionpriceServiceLPN;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@Service("disservice")
public class DistributionpriceServiceImplLPN implements DistributionpriceServiceLPN{

	
	//属性注入
	@Resource
	private  DistributionpriceDaoLPN disDao;
	
	
	@Override
	public JSONObject getDis(int page, int rows, int uid) {
		JSONObject j = new JSONObject();
		j.put("total",disDao.getDisCount());
		j.put("rows", disDao.getDis(page, rows, uid));
		return j;
	}


	@Override
	public boolean insertDIS(Double disFirstKilogramPrice, Double disNextKilogramPrice, Double disFirstCubicPrice,
			Double disNextCubicPrice, String disRemarks, String disState, int dpIdf, int dpIds, int otId) {
		// TODO Auto-generated method stub
		return disDao.insertDIS(disFirstKilogramPrice, disNextKilogramPrice, disFirstCubicPrice, disNextCubicPrice, disRemarks, disState, dpIdf, dpIds, otId);
	}


	@Override
	public int updateDIS(int disId, Double disFirstKilogramPrice, Double disNextKilogramPrice,
			Double disFirstCubicPrice, Double disNextCubicPrice, String disRemarks) {
		// TODO Auto-generated method stub
		return disDao.updateDIS(disId, disFirstKilogramPrice, disNextKilogramPrice, disFirstCubicPrice, disNextCubicPrice, disRemarks);
	}


	@Override
	public int finddisIdByDpidfAndDpidsAndOtid( int dpIdf, int dpIds, int otId) {
		// TODO Auto-generated method stub
		return disDao.finddisIdByDpidfAndDpidsAndOtid(dpIdf, dpIds, otId);
	}

}
